<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 添加
    // var arr = ['q', 'w']

    // arr.push('e', 'r') // 从数组后边去追加
    // arr.unshift(1, 2, 3)  //从数组前边去添加

    // arr: 123 qwer

    // arr.pop()   //从后边删除一个

    // console.log( arr )

    // arr.shift()  //从前边删除一个

    // console.log(arr)


    var arr = [100, 200, 300, 250, 500]
    var newArr = []

    for(var i = 0; i < arr.length; i++) {
      if( arr[i] >= 250 ) {
        newArr.push( arr[i] )
      }
    }
    console.log( newArr )
  </script>
</body>
</html>